export default function setTitle(title) {
  document.title = title;

  const iframe = document.createElement('iframe');

  iframe.style.cssText = 'display: none; width: 0; height: 0;';
  iframe.src = ''; 

  const listener = () => {
    setTimeout(() => {
      iframe.removeEventListener('load', listener);
      setTimeout(() => {
        document.body.removeChild(iframe);
      }, 0);
    }, 0);
  };
  iframe.addEventListener('load', listener);

  document.body.appendChild(iframe);
}